Skip to content

feat: Change embedded view detection#39

Merged
jamesnrokt merged 2 commits into
mainfrom
feat/change-embedded-view-detection
Oct 23, 2025
Merged

feat: Change embedded view detection#39
jamesnrokt merged 2 commits into
mainfrom
feat/change-embedded-view-detection

Conversation

@jamesnrokt

Copy link
Copy Markdown
Collaborator

Instructions

  1. PR target branch should be against development
  2. PR title name should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-title-check.yml
  3. PR branch prefix should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-branch-check-name.yml

Summary

  • When developing Maui I was finding that MPEmbeddedViews weren't being passed to Rokt
  • I found that as both the mParticle Maui SDK and the mParticle Maui Rokt Kit depended on the mParticle Apple SDK it was creating different pointers to the classes
  • This PR introduces detection of the class using string to avoid the views being stripped

Testing Plan

  • Was this tested locally? If not, explain why.
  • Tested via the Maui integration

Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)

  • Closes N/A

@jamesnrokt jamesnrokt requested a review from a team as a code owner October 21, 2025 03:54
Comment on lines +161 to +163
if (!isUIView) {
continue;
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need to print a log here as well to notify that the view is of the incorrect type?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great shout I added log for it not being MPRoktEmbeddedView but not for UIView and it'll be helpful for debug!

@jamesnrokt jamesnrokt merged commit e0c2b81 into main Oct 23, 2025
4 checks passed
@jamesnrokt jamesnrokt deleted the feat/change-embedded-view-detection branch October 23, 2025 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants